package com.ruoyi.hotel.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.hotel.domain.HlPost;
import com.ruoyi.hotel.mapper.HlPostMapper;
import com.ruoyi.hotel.service.IHlPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 岗位Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlPostServiceImpl implements IHlPostService 
{
    @Autowired
    private HlPostMapper hlPostMapper;

    /**
     * 查询岗位
     * 
     * @param postId 岗位主键
     * @return 岗位
     */
    @Override
    public HlPost selectHlPostById(Long postId)
    {
        return hlPostMapper.selectHlPostById(postId);
    }

    /**
     * 查询岗位列表
     * 
     * @param hlPost 岗位
     * @return 岗位
     */
    @Override
    public List<HlPost> selectHlPostList(HlPost hlPost)
    {
        return hlPostMapper.selectHlPostList(hlPost);
    }



    /**
     * 修改岗位
     * 
     * @param hlPost 岗位
     * @return 结果
     */
    @Override
    public int updateHlPost(HlPost hlPost)
    {
        hlPost.setUpdateTime(DateUtils.getNowDate());
        return hlPostMapper.updateHlPost(hlPost);
    }


}
